hackerrank java output formatting solution

visit shbcf.ru